package com.njwt.cloud.mscommon.feign.client;

import com.njwt.cloud.mscommon.feign.config.FeignRequestInterceptorConfig;
import com.njwt.cloud.mscommon.feign.fallback.UserClientFallBack;
import com.njwt.cloud.mscommon.support.ApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author <a href="mailto:xingxiaofeng@gtmap.cn">xingxiaofeng</a>
 * @date 2022-06-22
 * @desc UserClient
 */
@FeignClient(contextId = "userClient", name = "user-provider",  fallback = UserClientFallBack.class)
public interface UserClient {

    @GetMapping("/user/api/{username}")
    ApiResponse getUserByUserName(@PathVariable(value = "username") String username);

    @GetMapping("/user/info/{id}")
    ApiResponse loadUserByUserId(@PathVariable(value="id") String id);
}
